package com.cy.pj.common.pojo;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

@Data
public class Result {
    /*响应状态码*/
    private Integer state=1;
    /*状态码信息*/
    private String messasge="ok";
    /*状态码对应的具体数据 */
    private Object data;

    public Result(String message){
        this.messasge=message;
    }

    public Result(Object data) {
        this.data = data;
    }

    public Result(Throwable e) {
        this.state = 0;
        this.messasge=e.getMessage();
    }
}
